package group.program.Controller;

import group.program.Service.DbdocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("database")
public class DbdocumentController {
    @Autowired
    private DbdocumentService dbdocumentService;
    @PostMapping("/dbDocument")
    public String embedding(@RequestParam("file") MultipartFile file){
        return dbdocumentService.extractInformation(file);
    }
}
